/* flex */
.flx-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flx-justify-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flx-align-center {
  display: flex;
  align-items: center;
}

/* clearfix */
.clearfix::after {
  display: block;
  height: 0;
  overflow: hidden;
  clear: both;
  content: "";
}

/* 文字单行省略号 */
.sle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 文字多行省略号 */
.mle {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 文字多了自动換行 */
.break-word {
  word-break: break-all;
  word-wrap: break-word;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all 0.2s;
}
.fade-transform-enter-from {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(-30px);
}
.fade-transform-leave-to {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(30px);
}

/* breadcrumb-transform */
.breadcrumb-enter-active {
  transition: all 0.2s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(10px);
}

/* scroll bar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background-color: var(--el-border-color-darker);
  border-radius: 20px;
}

/* nprogress */
#nprogress .bar {
  background: var(--el-color-primary) !important;
}
#nprogress .spinner-icon {
  border-top-color: var(--el-color-primary) !important;
  border-left-color: var(--el-color-primary) !important;
}
#nprogress .peg {
  box-shadow:
    0 0 10px var(--el-color-primary),
    0 0 5px var(--el-color-primary) !important;
}

/* 外边距、内边距全局样式 */
@for $i from 0 through 100 {
  .mt#{$i} {
    margin-top: #{$i}px !important;
  }
  .mr#{$i} {
    margin-right: #{$i}px !important;
  }
  .mb#{$i} {
    margin-bottom: #{$i}px !important;
  }
  .ml#{$i} {
    margin-left: #{$i}px !important;
  }
  .pt#{$i} {
    padding-top: #{$i}px !important;
  }
  .pr#{$i} {
    padding-right: #{$i}px !important;
  }
  .pb#{$i} {
    padding-bottom: #{$i}px !important;
  }
  .pl#{$i} {
    padding-left: #{$i}px !important;
  }
}

/*  弹框  */
.confirm-box {
  padding: 24px !important;
  .el-message-box__container {
    display: block;
  }
  .el-message-box__headerbtn {
    top: 14px;
  }
  .box-title {
    position: relative;
    top: -16px;
    display: flex;
    justify-content: center;
    width: 90%;
  }
  .iconfont {
    font-size: 24px;
    color: #faad14ff;
  }
  .title {
    display: inline-block;
    width: calc(100% - 40px);
    margin-bottom: 8px;
    margin-left: 10px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 400;
    color: var(--el-text-color);
    text-overflow: ellipsis;
    word-wrap: break-word;
    white-space: nowrap;
  }
  .todo-title {
    margin: 20px 0;
  }
  .todo-item,
  .not-todo-item {
    display: inline-block;
    max-width: 151px;
    padding: 5px 16px;
    margin-right: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    color: var(--el-text-color4);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid var(--el-border-color);
    border-radius: 4px;
  }
  .not-todo-title {
    width: 100%;
    padding: 5px 0;
    margin: 24px 0;
    color: var(--el-text-color4);
    text-indent: 12px;
    background-color: rgb(255 77 79 / 8%);
    border: 1px solid rgb(255 77 79 / 25%);
    border-radius: 4px;
    .warning-text {
      color: rgb(255 77 79 / 100%);
    }
  }
  .no-todo-box {
    .not-todo-item {
      color: var(--el-icon-color);
      background: var(--el-bg-color2);
    }
  }
}
